#coding=utf-8
from django.shortcuts import render
from models import *
from django.db.models import Max,F
# Create your views here.


def index(request):
    # list = BookInfo.books1.filter(heroinfo__hcontent__contains='八')
    # list = BookInfo.books1.filter(pk__lte=3)
    # Max1 = BookInfo.books1.aggregate(Max('bpub_date'))
    list = BookInfo.books1.filter(bread__gt=F('bcomment'))
    context = {'list1': list
                # ,'Max1': Max1
               }
    return render(request, 'booktest/index.html', context)